<html>
<head>
    <link href="${ctx}/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="${ctx}/font-awesome/3.0.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="${ctx}/wangEditor/10.0.13/wangEditor.min.css" rel="stylesheet">
    <link href="${ctx}/css/index.css" rel="stylesheet">
    <script src="${ctx}/jquery/2.1.4/jquery.min.js"></script>
    <script src="${ctx}/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="${ctx}/wangEditor/10.0.13/wangEditor.min.js"></script>
    <script src="${ctx}/js/iw.js"></script>
    <style>
        [class*='col-xs-'] {
            margin-bottom: 10px;
        }

        .hide {
            display: none;
        }
    </style>

</head>
<body class="container-fuild" style="padding-top: 5px;">
<div style="text-align:center;">
    用户: <#if member??>${member.phone}</#if> &nbsp;&nbsp;&nbsp;&nbsp; 任务：<#if task??>${task.title}</#if>
</div>
<div style="text-align:center; padding-top: 10px;">
    <#if result??>
        <#list result as item>
            <div class="<#if result?size==1>col-xs-offset-4</#if> <#if result?size==2>col-xs-offset-1</#if> col-xs-4">
                <img style="width:100%;height:auto; border: 1px solid #ccc;" src="${item.image}"/>
            </div>

        </#list>

    </#if>
</div>
<div class="col-xs-4 col-xs-offset-8" style="text-align:left;margin-left: 300px;">
    <select id="select" style="width:150px;height:21px;margin-left: -170;" onchange="a()">
        <option value="1" selected>未按要求完成任务</option>
        <option value="2">截图不合规定</option>
    </select>
    <input id="_input" style="width:150px;height:21px;margin-left: -173;margin-bottom: 2px;margin-top: 2px;;"
           type="text"/>
</div>
</div>
<div class="col-xs-4 col-xs-offset-8" style="text-align:center;">
    <button style="width: 85px;" class="btn btn-success" id="success_btn">成功（A）</button>
    <button style="width: 85px;" class="btn btn-warning" id="fail_btn">失败（D）</button>
</div>
<script>
    function a() {
        $("#_input").val($("#select option:selected").text());
    }

    $(function () {
        $("#success_btn").click(function () {
            $.post("/soso/check", {
                status: '任务成功',
                memberid: '${member.memberId}',
                taskid: '${task.taskId}',
            }, function (res) {
                $("#fail_btn").hide();
                $("#success_btn").hide();
                alert(res);
            });
        });

        $("#fail_btn").click(function () {
            $.post("/soso/check", {
                status: '任务失败',
                memberid: '${member.memberId}',
                taskid: '${task.taskId}',
            }, function (res) {
                $("#success_btn").hide();
                alert(res);
            });
        });
    });

</script>
</body>
</html>
